home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
oath.lha
/
oath
/
test
/
anycase.cc
< prev
next >
Wrap
C/C++ Source or Header
|
1991-08-29
|
713b
|
23 lines
#include <iostream.h>
#include "oath/oath.h"
main ()
{const char * T = "R";
if(tolower(*T) == tolower('R') && tolower(*T) == tolower('r'))
cout << "tolower() seems to work." << endl;
stringA S = minStringA::make("rangeRangeRANGErANGE*", 1);
stringPosA P = S.makePos();
cout << "Four tests:" << endl;
if(P.matchAnyCase("range"))
cout << " 1 -- range; now at " << *P << endl;
if(P.matchAnyCase("range"))
cout << " 2 -- Range; now at " << *P << endl;
if(P.matchAnyCase("range"))
cout << " 3 -- RANGE; now at " << *P << endl;
if(P.matchAnyCase("range"))
cout << " 4 -- rANGE; now at " << *P << endl;
cout << "End tests." << endl;
}